<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.List" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Sunyu Bus Booking System - Selecting Bus</title>
</head>
<body>
<%
	String msg = (String)request.getAttribute("msg");
	if (msg != null && msg != "") {
		out.print("<font color='red'>" + msg + "</font> <br>");
	}
%>
<form action="BookingSelectBusProc.do">	
	<select name="bus_id">
	<%
		List lstBus = (List)request.getAttribute("buses");
		for (int i = 0; i < lstBus.size(); ++i) {
			String bus = (String)lstBus.get(i);
			
			out.print("<option value='" + bus +"'>" + bus + "</option>");
		}
	%>
	</select> <br>
	<input type="submit" value="Select Bus"> <br>				
</form>
</body>
</html>